#@layoutMain()
#define mainMessage()
<fieldset class="layui-elem-field layui-field-title">
  <legend>修改文章资源</legend>
</fieldset>
   <div>
     	<div style="padding-left: 10px">
   		<form class="layui-form" action="/admin/article/editArticle" method="post">
   			<input type="hidden" name="article.aid" value="#(article.aid??)" />
   			<input type="hidden" name="article.user_id" value="#(article.user_id??)" />
   			<div class="layui-form-item">
   			<label class="layui-input-block">
   				发帖规范，利于seo，必看&nbsp;&nbsp;<a href="/" target="_blank"><font color="red">发帖规范</font></a>
   			</label>
   			</div>
   			<div class="layui-form-item">
			    <label class="layui-form-label">资源名称：</label>
			    <div class="layui-input-block">
			      <input type="text" id="article.name" name="article.name" value="#(article.name??)" lay-verify="required" autocomplete="off" placeholder="请输入资源名称" class="layui-input">
			    </div>
			</div>
	  <div class="layui-form-item">
	    <label class="layui-form-label">资源类别：</label>
	    <div class="layui-input-inline">
	      <select id="article.type_id" name="article.type_id" lay-verify="required">
	        <option value="#(arcTypeList.tid)">#(arcTypeList.name)</option>
	       <!--   #for(arctype : arcTypeList)
	        	<option value="#(arctype.tid)">#(arctype.name)</option>
	        #end-->
	      </select>
	    </div>
	  </div>
	  <div class="layui-form-item">
	    <label class="layui-form-label">资源描述：</label>
	    <div class="layui-input-block">
	    	<textarea id="articleAdd" name="article.content" style="display: none;" > #(article.content??) </textarea>	
	    </div>
	 </div>
	 <div class="layui-form-item">
	   <div class="layui-inline">
	      <label class="layui-form-label">分享资源：</label>
	      <div class="layui-input-inline" style="width: 400px">
	        <input type="text" id="article.download1" name="article.download1" value="#(article.download1??)" lay-verify="url" autocomplete="off" placeholder="请输入百度云分享地址" class="layui-input">
	      </div>
	      <div class="layui-input-inline" style="width: 100px">
	        <input type="text" id="article.password1" name="article.password1" value="#(article.password1??)" lay-verify="required" autocomplete="off" placeholder="请输入密码" class="layui-input">
	      </div>
	    </div>
	 </div>
	 <div class="layui-form-item">
	    <label class="layui-form-label">积分设置：</label>
	    <div class="layui-input-inline" style="width: 120px">
	      <select id="article.points" name="article.points" lay-verify="required">
	        <option value="#(article.points??)">#(article.points??)积分</option>
	      </select>
	    </div>
	  </div>
	  
	  <div class="layui-form-item">
	    <label class="layui-form-label">审核状态</label>
	    <div class="layui-input-block">
	      <input type="radio" name="article.state" value="1" title="未审核" 
			#if( article.state ?? == 1 )
				checked=""
			#end>
	      <input type="radio" name="article.state" value="2" title="审核通过"
	      	#if( article.state ?? == 2 )
				checked=""
			#end>
	      <input type="radio" name="article.state" value="3" title="审核未通过"
	      	#if( article.state ?? == 3 )
				checked=""
			#end>
	    </div>
	  </div>
	  
    <div class="layui-form-item">
	    <label class="layui-form-label">审核建议</label>
	    <div class="layui-input-block">
	      <input type="text" id="article.reason" name="article.reason" value="#(article.reason??)" lay-verify="required" autocomplete="off" placeholder="请输入审核建议" class="layui-input">
	    </div>
	</div>
	  
	  <div class="layui-form-item">
	    <div class="layui-input-block">
	      <button class="layui-btn" lay-submit="" lay-filter="pa">立即提交</button>
	    </div>
	  </div>
			    <div class="layui-form-item fly-form-app">					
                 	#if(errorMsg)
          				<span style="color: red">#(errorMsg)</span>
     				#end
                 </div>
    		</form>
    	</div>
  </div>

#end

#define js()

<script>
layui.use('layedit', function(){
	var layedit = layui.layedit;
	layedit.build('articleAdd'); //建立编辑器
	layedit.set({
		  uploadImage: {
		    url: '/user/uploadImages' //接口url
		    ,type: '' //默认post
		  }
		});
});
</script>

#end